import 'package:flutter/material.dart';

class ProfilePage extends StatelessWidget {
  const ProfilePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('我的主页'),
        actions: [
          IconButton(
            icon: const Icon(Icons.settings),
            onPressed: () {
              // TODO: 打开设置页面
            },
          ),
        ],
      ),
      body: ListView(
        children: [
          const SizedBox(height: 20),
          // 用户头像和名称
          const CircleAvatar(
            radius: 50,
            backgroundImage: NetworkImage(
              'https://images.pexels.com/photos/30753562/pexels-photo-30753562.jpeg?auto=compress&cs=tinysrgb&w=600&lazy=load',
            ),
          ),
          const SizedBox(height: 10),
          const Text(
            '用户名',
            textAlign: TextAlign.center,
            style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
          ),
          const SizedBox(height: 20),
          // 功能列表
          ListTile(
            leading: const Icon(Icons.history),
            title: const Text('聊天历史'),
            trailing: const Icon(Icons.chevron_right),
            onTap: () {
              // TODO: 打开聊天历史页面
            },
          ),
          ListTile(
            leading: const Icon(Icons.favorite),
            title: const Text('收藏夹'),
            trailing: const Icon(Icons.chevron_right),
            onTap: () {
              // TODO: 打开收藏夹页面
            },
          ),
          ListTile(
            leading: const Icon(Icons.help),
            title: const Text('帮助与反馈'),
            trailing: const Icon(Icons.chevron_right),
            onTap: () {
              // TODO: 打开帮助页面
            },
          ),
          ListTile(
            leading: const Icon(Icons.info),
            title: const Text('关于'),
            trailing: const Icon(Icons.chevron_right),
            onTap: () {
              // TODO: 打开关于页面
            },
          ),
        ],
      ),
    );
  }
}
